package test09;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.LockSupport;

public class Park_Unpark {

    public static void main(String[] args) {

        Thread t1 = new Thread(() -> {
            System.out.println(Thread.currentThread().getName() + "--" + "1111111111");
            LockSupport.park();
            //进行阻塞
            System.out.println(Thread.currentThread().getName() + "--" + "22222222");


        });


        t1.start();

        try { TimeUnit.SECONDS.sleep(1); } catch (InterruptedException e) { e.printStackTrace();}

        LockSupport.unpark(t1);

        System.out.println("1");
        System.out.println("蛮吉的操作");
        System.out.println("我来了");

        System.out.println("gitee");
        System.out.println("update");

        System.out.println("**&&**");
    }
}
